Skip to main content
Version: 2.x.x

FetchRequestDataType


import { FetchRequestDataType } from "@hyper-fetch/core"

Description

If the command data is not filled it will throw an error

Defined in command/command.types.ts:234

Preview

type FetchRequestDataType<RequestDataType,HasData> = RequestDataType extends NegativeTypes ? { data?: NegativeTypes } : HasData extends true ? { data?: NegativeTypes } : { data: NonNullable<RequestDataType> };

Structure

RequestDataType extends NegativeTypes ? {
data: NegativeTypes;
} : (HasData extends true ? {
data: NegativeTypes;
} : {
data: NonNullable<RequestDataType>;
})